<?php

class Default_Model_User extends Zend_Db_Table_Abstract {

    protected $_name = 'user';

    public function getDataById($userId){
        $select = $this->select(self::SELECT_WITH_FROM_PART)->columns(array('password'))->where('userId=?',$userId);
        return $this->fetchRow($select);
    }

    public function getDataByUsername($username){
        $query = $this->select()
            ->from($this->_name)
            ->where('username = ?', $username);
        return $this->fetchRow($query);
    }

    public function getDataByEmail($email){
        $query = $this->select()
            ->from($this->_name)
            ->where('email = ?', $email);
        return $this->fetchRow($query);
    }



} 